package erfgame.core.world.terrain.factory;


import erfgame.core.Dimensions3D;
import erfgame.core.Rotation;
import erfgame.core.world.terrain.MaterialType;
import erfgame.core.world.terrain.TerrainUpdate;
import erfgame.core.world.terrain.TerrainUpdateByMaterialTypeBoundsAndRotationFactory;
import erfgame.core.world.terrain.TerrainUpdateByMaterialTypeFactory;
import erfgame.core.world.terrain.TerrainUpdateGroup;

/**
 * Stupid adapter because I'm not sure what my interfaces should be
 * @author chris
 *
 */
public class TerrainUpdateByMaterialTypeToMaterialTypeBoundsAndRotationFactoryAdapter
		implements TerrainUpdateByMaterialTypeFactory {
	
	private TerrainUpdateByMaterialTypeBoundsAndRotationFactory to;
	private Rotation rotation;
	private Dimensions3D bounds;
	
	public TerrainUpdateByMaterialTypeToMaterialTypeBoundsAndRotationFactoryAdapter(
			TerrainUpdateByMaterialTypeBoundsAndRotationFactory to, 
			Rotation rotation, 
			Dimensions3D bounds
	) {
		this.to = to;
		this.rotation = rotation;
		this.bounds = bounds;
	}

	public TerrainUpdateGroup createTerrainUpdate(byte materialType) {
		return to.createTerrainUpdate(materialType, bounds, rotation);
	}

}
